/*
 * @Author: humengchuan 531537052@qq.com
 * @Date: 2024-11-14 14:58:33
 * @LastEditors: humengchuan 531537052@qq.com
 * @LastEditTime: 2024-11-15 14:41:21
 * @FilePath: \projecte:\crossPlatform\chuan-project\src\pages\index\index.jsx
 * @Description: 
 */
import { useState } from 'react'
import { View, Text } from '@tarojs/components'
import { useLoad } from '@tarojs/taro'
import './index.scss'


export default function Index () {
  const DEFAULT_TAB_LIST = [
    {
      name: '首页',
      icon: 'home-o'
    },
    {
      name: '分类',
      icon: 'category-o'
    }
  ]
  const [count, setCount] = useState(0)
  const innerStyle = {
    with: `${100 / DEFAULT_TAB_LIST.length}%`,
    transform: `translateX(${count * 100})%`
  }

  const handleTabClick = (index) => {
    console.log('%c [ index ]-33', index)
    setCount(index)
  }
  useLoad(() => {
    console.log('Page loaded.')
  })

  return (
    <View className='index-container'>
      <View className='top'>
        <View className='index-tab'>
          
        </View>
      </View>
      
      <Text>Hello world!</Text>
    </View>
  )
}
